__author__ = 'Administrator'


class BasePage(object):
    def __init__(self, driver):
        self.driver = driver
        self.pageLocation = ""

    def open(self):
        self.driver.get(self.pageLocation)

    def close(self):
        self.driver.close()

    def find_element(self, locator, element_index=0):
        return self.driver.find_elements(locator[0], locator[1])[element_index]